import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
// user模块导入
import useUserStore from './modules/user'
import useConsultStore from './modules/consult'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

export default pinia // 一个模块中只能有一个默认导出

export const useStore = () => {
  return {
    user: useUserStore(),
    consult: useConsultStore()
    // 模块B: 模块()
  }
}
